package com.ruoyi.common.entity.TransactionEntity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 促销活动管理对象 promotion
 * 
 * @author x
 * @date 2025-08-07
 */
public class Promotion extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 活动ID */
    private Long id;

    /** 所属门店ID（NULL为平台级活动） */
    @Excel(name = "所属门店ID", readConverterExp = "N=ULL为平台级活动")
    private Long storeId;

    /** 活动名称 */
    @Excel(name = "活动名称")
    private String name;

    /** 活动类型（1-秒杀 2-限时折扣 3-满减） */
    @Excel(name = "活动类型", readConverterExp = "1=-秒杀,2=-限时折扣,3=-满减")
    private Long type;

    /** 适用范围（1-指定商品规格 2-指定品牌） */
    @Excel(name = "适用范围", readConverterExp = "1=-指定商品规格,2=-指定品牌")
    private Long scope;

    /** 活动开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "活动开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 活动结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "活动结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 状态（0-未开始 1-进行中 2-已结束 ） */
    @Excel(name = "状态", readConverterExp = "0=-未开始,1=-进行中,2=-已结束")
    private Long status;

    /** 活动封面图 */
    @Excel(name = "活动封面图")
    private String bannerUrl;

    /** 活动描述 */
    @Excel(name = "活动描述")
    private String description;

    /** 优先级，数值越大优先级越高 */
    @Excel(name = "优先级，数值越大优先级越高")
    private Long priority;

    /** 删除标志（0未删除，1已删除） */
    private String delFlag;

    /** 创建人 */
    @Excel(name = "创建人")
    private String createdBy;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setStoreId(Long storeId) 
    {
        this.storeId = storeId;
    }

    public Long getStoreId() 
    {
        return storeId;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setType(Long type) 
    {
        this.type = type;
    }

    public Long getType() 
    {
        return type;
    }

    public void setScope(Long scope) 
    {
        this.scope = scope;
    }

    public Long getScope() 
    {
        return scope;
    }

    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setBannerUrl(String bannerUrl) 
    {
        this.bannerUrl = bannerUrl;
    }

    public String getBannerUrl() 
    {
        return bannerUrl;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setPriority(Long priority) 
    {
        this.priority = priority;
    }

    public Long getPriority() 
    {
        return priority;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public void setCreatedBy(String createdBy) 
    {
        this.createdBy = createdBy;
    }

    public String getCreatedBy() 
    {
        return createdBy;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("storeId", getStoreId())
            .append("name", getName())
            .append("type", getType())
            .append("scope", getScope())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("status", getStatus())
            .append("bannerUrl", getBannerUrl())
            .append("description", getDescription())
            .append("priority", getPriority())
            .append("delFlag", getDelFlag())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createdBy", getCreatedBy())
            .toString();
    }
}
